package com.neulogistics.core.substation.api.application.converter;

import cn.hutool.json.JSONUtil;
import com.neulogistics.core.substation.api.application.viewmodel.SubstationTreeViewModel;
import com.neulogistics.core.substation.api.application.viewmodel.SubstationViewModel;
import com.neulogistics.core.substation.domain.model.valueobject.Address;
import com.neulogistics.core.substation.infrastructure.persistence.orm.po.SubstationPO;
import org.springframework.beans.BeanUtils;

public class SubstationTreePOVMConverter {
    private static final int Rate = 100;

    public static SubstationTreeViewModel POToVM(SubstationPO substationPO){
        if (substationPO == null)
            return null;

        SubstationTreeViewModel substationTreeViewModel = new SubstationTreeViewModel();
        substationTreeViewModel.setId(substationPO.getSubstationId());
        substationTreeViewModel.setName(substationPO.getSubstationName());

        return substationTreeViewModel;
    }
}
